//
//  AddItemViewController.h
//  CheckList
//
//  Created by chen on 15/8/4.
//  Copyright (c) 2015年 ZhangXM. All rights reserved.
//

#import <UIKit/UIKit.h>

@class AddItemViewController;
@class CheckListItem;
@protocol AddItemViewControllerDelegate <NSObject>;

- (void) addItemViewControllerDidCancel:(AddItemViewController *)controller;

- (void) addItemViewController:(AddItemViewController *)controller didFinishAddingItem:(CheckListItem *)item;
- (void) addItemViewController:(AddItemViewController *)controller didFinishEditingItem:(CheckListItem *)item;

@end
@interface AddItemViewController : UITableViewController <UITextFieldDelegate>
- (IBAction)cancelBarButton:(UIBarButtonItem *)sender;
- (IBAction)doneBarButton:(UIBarButtonItem *)sender;
@property (strong, nonatomic) IBOutlet UITextField *textField;
@property (strong, nonatomic) IBOutlet UIBarButtonItem *doneBarButton;
@property (nonatomic,strong) id<AddItemViewControllerDelegate>delegate;
@property (nonatomic,strong) CheckListItem *itemToEdit;
@end
